<?php


namespace framework\libraries;

class ErrorType
{

    const SUCCESS = 0;
    const CUSTOM_MSG = 10000;
    const UNKNOWN_ERR = 10001;
    const API_NOT_EXIST = 10002;
    const FORM_VALIDATE_FAIL = 10003;
    const CAPTCHA_ERROR = 10004;
    const CAPTCHA_EXPIRED = 10005;
    const MISSING_PARAMETER = 10006;
    const THIRD_FUNCTION_FAIL = 10007;
    const INVALID_PARAMETER = 10008;
    const THIRD_FUNCTION_RESULT = 10009;
    const NOT_EXISTS = 10010;
    const PASSWORD_MISMATCH = 10011;
    const ACCOUNT_DISABLED = 10012;
    const PERMISSION_DENIED = 10013;
    const DATABASE_OPERATION_ERR = 10014;
    const UPLOAD_FILE_NOT_EXIST = 10015;
    const MUST_BIND_MOBILE = 10016;
    const MOBILE_HAS_REGISTERD = 10017;
    const CURRENT_STATUS_DISABLE = 10018;
    const ASSOCIATED_CONTENT_CANNOT_BE_DELETED = 10019;
    const SYSTEM_CHECK_FAIL = 10020;
    const SEC_CHECK_FAIL = 10021;
    const NOT_OWNER = 10022;
    const BANNED_USER = 30001;

    const messages = [
        self::SUCCESS => 'ok',
        self::CUSTOM_MSG => '',
        self::UNKNOWN_ERR => "未知错误",
        self::API_NOT_EXIST => "API 不存在",
        self::FORM_VALIDATE_FAIL => "表单验证错误",
        self::CAPTCHA_ERROR => "图形验证码错误",
        self::CAPTCHA_EXPIRED => "图形验证码已过期",
        self::MISSING_PARAMETER => "丢失必要的参数",
        self::INVALID_PARAMETER => "无效的参数",
        self::THIRD_FUNCTION_FAIL => "第三方调用失败",
        self::THIRD_FUNCTION_RESULT => "第三方调用结果",
        self::NOT_EXISTS => "不存在",
        self::PASSWORD_MISMATCH => "密码错误",
        self::ACCOUNT_DISABLED => "账号已禁用",
        self::PERMISSION_DENIED => "权限不足",
        self::DATABASE_OPERATION_ERR => "数据库错误",
        self::UPLOAD_FILE_NOT_EXIST => "上传的文件不存在",
        self::MUST_BIND_MOBILE => "请先绑定手机号码",
        self::MOBILE_HAS_REGISTERD => "手机号码已注册",
        self::CURRENT_STATUS_DISABLE => "当前状态不允许此操作",
        self::SYSTEM_CHECK_FAIL => "系统校验错误",
    ];
}
